import QtQuick
import QtQuick.Controls

Rectangle {
    height: 252
    width: 1831
    color: "#00000000"
    FontLoader{
        id: boldFont
        source:"fonts/SourceHanSansCN-Bold.otf"
    }
    Image {
        x: 24
        y: 12
        width: 211
        height: 38
        source: "images/action-little_title-background.png"
        fillMode: Image.PreserveAspectFit

        Text {
            id: text1
            color: "#ffffff"
            text: qsTr("行走")
            anchors.fill: parent
            anchors.leftMargin: 0
            anchors.rightMargin: 0
            anchors.topMargin: 0
            anchors.bottomMargin: 0
            font.pixelSize: 18
            font.family: boldFont.name
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
        }
    }

    Grid {
        id: grid
        x: 40
        y: 69
        spacing: 10
        columns: 2

        ActionLabel {
            id: actionLabel
            text: "左前进"
            highlights: favorite.do58
        }

        ActionLabel {
            id: actionLabel1
            text: "右前进"
            highlights: favorite.do60
        }

        ActionLabel {
            id: actionLabel2
            text: "左后退"
            highlights: favorite.do59
        }

        ActionLabel {
            id: actionLabel3
            text: "右后退"
            highlights: favorite.do61
        }

        ActionLabel {
            id: actionLabel4
            text: "行走"
            highlights: favorite.do58 || favorite.do59 || favorite.do60 || favorite.do61
        }

        ActionLabel {
            id: actionLabel60
            text: "备用"
        }

        ActionLabel {
            id: actionLabel61
            text: "备用"
        }

        ActionLabel {
            id: actionLabel62
            text: "备用"
        }
    }

    Image {
        x: 368
        y: 12
        width: 211
        height: 38
        source: "images/action-little_title-background.png"
        fillMode: Image.PreserveAspectFit
        Text {
            id: text2
            color: "#ffffff"
            text: qsTr("调姿")
            anchors.fill: parent
            anchors.leftMargin: 0
            anchors.rightMargin: 0
            anchors.topMargin: 0
            anchors.bottomMargin: 0
            font.pixelSize: 18
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            font.family: boldFont.name
        }
    }

    Image {
        x: 1185
        y: 12
        width: 211
        height: 38
        source: "images/action-little_title-background.png"
        fillMode: Image.PreserveAspectFit
        Text {
            id: text3
            color: "#ffffff"
            text: qsTr("打钻")
            anchors.fill: parent
            anchors.leftMargin: 0
            anchors.rightMargin: 0
            anchors.topMargin: 0
            anchors.bottomMargin: 0
            font.pixelSize: 18
            horizontalAlignment: Text.AlignHCenter
            verticalAlignment: Text.AlignVCenter
            font.family: boldFont.name
        }
    }

    Row {
        id: row
        x: 704
        y: 69
        spacing: 20

        Grid {
            id: grid3
            columns: 2
            spacing: 10

            ActionLabel {
                id: actionLabel17
                text: "钻杆前移"
                highlights: favorite.do55
            }

            ActionLabel {
                id: actionLabel18
                text: "钻杆左移"
                highlights: favorite.do53
            }

            ActionLabel {
                id: actionLabel19
                text: "钻杆后移"
                highlights: favorite.do54
            }

            ActionLabel {
                id: actionLabel20
                text: "钻杆右移"
                highlights: favorite.do52
            }

            ActionLabel {
                id: actionLabel21
                text: "钻杆框升"
                highlights: favorite.do47
            }

            ActionLabel {
                id: actionLabel22
                text: "托钻杆升"
                highlights: favorite.do45
            }

            ActionLabel {
                id: actionLabel23
                text: "钻杆框降"
                highlights: favorite.do46
            }

            ActionLabel {
                id: actionLabel24
                text: "托钻杆降"
                highlights: favorite.do44
            }
        }

        Grid {
            id: grid4
            spacing: 10
            ActionLabel {
                id: actionLabel25
                text: {
                    return "转速:" + (favorite.do56 | favorite.do57);
                }
                highlights: true
            }

            ActionLabel {
                id: actionLabel26
                text: {
                    return "推进:" + (favorite.do62 | favorite.do63);
                }

                highlights: true
            }

            ActionLabel {
                id: actionLabel27
                text: "排渣正"
                highlights: favorite.do16
            }

            ActionLabel {
                id: actionLabel28
                text: "排渣反"
                highlights: favorite.do17
            }

            ActionLabel {
                id: actionLabel29
                text: "马达正转"
                highlights: favorite.do56
            }

            ActionLabel {
                id: actionLabel30
                text: "马达反转"
                highlights: favorite.do57
            }

            ActionLabel {
                id: actionLabel31
                text: "给进"
                highlights: favorite.do62
            }

            ActionLabel {
                id: actionLabel32
                text: "起拨"
                highlights: favorite.do63
            }
            columns: 2
        }

        Grid {
            id: grid5
            spacing: 10
            ActionLabel {
                id: actionLabel33
                text: "前夹持开"
                highlights: favorite.do43
            }

            ActionLabel {
                id: actionLabel34
                text: "前夹持合"
                highlights: favorite.do42
            }

            ActionLabel {
                id: actionLabel35
                text: "后夹持开"
                highlights: favorite.do41
            }

            ActionLabel {
                id: actionLabel36
                text: "后夹持合"
                highlights: favorite.do40
            }

            ActionLabel {
                id: actionLabel37
                text: "机械手前旋"
                highlights: favorite.do51
            }

            ActionLabel {
                id: actionLabel38
                text: "机械手后旋"
                highlights: favorite.do50
            }

            ActionLabel {
                id: actionLabel39
                text: "机械手正旋"
                highlights: favorite.do37
            }

            ActionLabel {
                id: actionLabel40
                text: "机械手负旋"
                highlights: favorite.do36
            }
            columns: 2
        }

        Grid {
            id: grid6
            spacing: 10
            ActionLabel {
                id: actionLabel41
                text: "侧卸伸"
                highlights: favorite.do39
            }

            ActionLabel {
                id: actionLabel42
                text: "侧卸缩"
                highlights: favorite.do38
            }

            ActionLabel {
                id: actionLabel43
                text: "浮动开"
                highlights: favorite.do1
            }

            ActionLabel {
                id: actionLabel44
                text: "浮动关"
                highlights: !favorite.do1
            }

            ActionLabel {
                id: actionLabel45
                text: "机械手伸"
                highlights: favorite.do35
            }

            ActionLabel {
                id: actionLabel46
                text: "机械手缩"
                highlights: favorite.do34
            }

            ActionLabel {
                id: actionLabel47
                text: "机械手夹紧"
                highlights: favorite.do33
            }

            ActionLabel {
                id: actionLabel48
                text: "机械手松开"
                highlights: favorite.do32
            }
            columns: 2
        }

        Grid {
            id: grid7
            spacing: 10
            ActionLabel {
                id: actionLabel49
                text: "支撑油缸夹"
                highlights: favorite.do49
            }

            ActionLabel {
                id: actionLabel50
                text: "支撑油缸松"
                highlights: favorite.do48
            }

            ActionLabel {
                id: actionLabel53
                text: "供水开"
                highlights: favorite.do12
            }

            ActionLabel {
                id: actionLabel54
                text: "供水关"
                highlights: favorite.do11
            }

            ActionLabel {
                id: actionLabel10
                text: "托钻杆升2"
                highlights: favorite.do18
            }

            ActionLabel {
                id: actionLabel12
                text: "托钻杆降2"
                highlights: favorite.do19
            }

            ActionLabel {
                id: actionLabel51
                text: "备用"
            }

            ActionLabel {
                id: actionLabel52
                text: "备用"
            }
            columns: 2
        }

        Grid {
            id: grid8
            spacing: 10
            ActionLabel {
                id: actionLabel55
                text: {
                    if(favorite.autoPush){
                        return qsTr("打钻");
                    }
                    else if(favorite.autoPull){
                        return qsTr("卸钻");
                    }
                    else{
                        return qsTr("打钻/卸钻");
                    }
                }
                highlights: favorite.autoPush || favorite.autoPull
            }

            ActionLabel {
                id: actionLabel56
                text: {
                    if(favorite.isStarted){
                        return qsTr("开始");
                    }
                    else if(favorite.isPaused){
                        return qsTr("暂停");
                    }
                    else{
                        return qsTr("开始/暂停");
                    }
                }
                highlights: favorite.isStarted || favorite.isPaused
            }

            ActionLabel {
                id: actionLabel57
                text: "停止"
                highlights: favorite.isStopped
            }

            ActionLabel {
                id: actionLabel67
                text: "备用"
            }
            columns: 1
        }
    }

    Row {
        id: row1
        x: 272
        y: 69
        spacing: 20

        Grid {
            id: grid1
            spacing: 10
            ActionLabel {
                id: actionLabel5
                text: "上支撑升"
                highlights: favorite.do27
            }

            ActionLabel {
                id: actionLabel6
                text: "下支撑升"
                highlights: favorite.do25
            }

            ActionLabel {
                id: actionLabel7
                text: "上支撑降"
                highlights: favorite.do26
            }

            ActionLabel {
                id: actionLabel8
                text: "下支撑降"
                highlights: favorite.do24
            }

            ActionLabel {
                id: actionLabel9
                text: "钻角正"
                highlights: favorite.do31
            }

            ActionLabel {
                id: actionLabel11
                text: "钻角负"
                highlights: favorite.do30
            }

            ActionLabel {
                id: actionLabel65
                text: "备用"
            }

            ActionLabel {
                id: actionLabel66
                text: "备用"
            }
            columns: 2
        }

        Grid {
            id: grid2
            spacing: 10
            ActionLabel {
                id: actionLabel13
                text: "前支撑升"
                highlights: favorite.do23
            }

            ActionLabel {
                id: actionLabel14
                text: "后支撑升"
                highlights: favorite.do21
            }

            ActionLabel {
                id: actionLabel15
                text: "前支撑降"
                highlights: favorite.do22
            }

            ActionLabel {
                id: actionLabel16
                text: "后支撑降"
                highlights: favorite.do20
            }

            ActionLabel {
                id: actionLabel58
                text: "钻角1升"
                highlights: favorite.do29
            }

            ActionLabel {
                id: actionLabel59
                text: "钻角1降"
                highlights: favorite.do28
            }

            ActionLabel {
                id: actionLabel63
                text: "备用"
            }

            ActionLabel {
                id: actionLabel64
                text: "备用"
            }

            columns: 2
        }
    }

}
